package es.aqua.aquac.il.dal.interfaces;

import java.util.List;

import es.aqua.aquac.exception.GeneralDAOException;

public interface GeneralDAO<E> {

	E insert(E entity) throws GeneralDAOException;

	void update(E entity) throws GeneralDAOException;

	void remove(E entity) throws GeneralDAOException;

	E findById(java.io.Serializable id) throws GeneralDAOException;

	List<E> findByCriteria(E entity, final String prop, final Boolean asc) throws GeneralDAOException;

	List<E> findAll() throws GeneralDAOException;

	List<E> findAllOrderBy(String prop, Boolean asc) throws GeneralDAOException;

	List<E> findByProperty(String prop, String value) throws GeneralDAOException;
}
